<#macro resolveEmbedEdit entityName embedName columnName>
<#assign managedBean = entityName?uncap_first+"Controller">
<#list embeddables.embeddable as embed>
	<#if embed.@name=embedName>
		<#list embed.column as column>
			<#if (column.@primary[0]="false") && (column.@mode[0]="MANUAL")>
	            <#if column.@type="Date">
	<h:outputLabel for="${column.@name}" value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
	<p:calendar id="${column.@name}" pattern="${config.date.@pattern}"  value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}" title="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}" <#if column.@required[0]="true">required="true" requiredMessage="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}Required${r"}"}"</#if>/>
	            <#elseif column.@type = "Boolean">
	<h:outputLabel for="${column.@name}" value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
	<h:selectBooleanCheckbox id="${column.@name}" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name}${r"}"}" />
	            <#elseif column.@type="String" && column.@size[0]??  && (column.@size?number > 256) >
	<h:outputLabel for="${column.@name}" value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
	<h:inputTextarea rows="5" cols="50" id="${column.@name}" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}" title="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}" <#if column.@required[0]="true">required="true" requiredMessage="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}Required${r"}"}"</#if>/>
	            <#elseif column.@type="String" >
	<h:outputLabel for="${column.@name}" value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
	<h:inputText id="${column.@name}" size="50" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}" title="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}" <#if column.@required[0]="true">required="true" requiredMessage="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}Required${r"}"}"</#if>/>
	           <#elseif enums.enum.@name?seq_contains(column.@type)>
	<h:outputLabel for="${column.@name}" value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
	<h:selectOneMenu id="${column.@name}" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}" title="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}" <#if column.@required[0]="true">required="true" requiredMessage="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}Required${r"}"}"</#if>>
	            <f:selectItems value="${r"#{"}utilController.${column.@type?uncap_first}Items${r"}"}"/>
	</h:selectOneMenu>
	            <#else>
	<h:outputLabel for="${column.@name}" value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
	        		<#if column.@name="password">
	<h:inputSecret id="${column.@name}" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}" title="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}" <#if column.@required[0]="true">required="true" requiredMessage="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}Required${r"}"}"</#if>/>
	            	<#else>
	<h:inputText id="${column.@name}" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}" title="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}" <#if column.@required[0]="true">required="true" requiredMessage="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}Required${r"}"}"</#if>/>   	
	            	</#if>
	            </#if>
	        </#if>
	        
		</#list>
	</#if>
</#list>
</#macro>
<#macro resolveEmbedView entityName embedName columnName>
<#assign managedBean = entityName?uncap_first+"Controller">
<#list embeddables.embeddable as embed>
	<#if embed.@name=embedName>
		<#list embed.column as column>
			 <#if column.@primary="false">
            	<#if column.@type = "Date" >
        <h:outputLabel value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
        <h:outputText value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}">
            <f:convertDateTime pattern="${config.date.@pattern}" timeZone="${r"#{"}utilController.timeZone}" />
        </h:outputText>
            	<#elseif column.@type = "Boolean">
        <h:outputLabel value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />        
        <h:selectBooleanCheckbox  disabled="true" value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name}${r"}"}" />
            	<#else>
        <h:outputLabel value="${r"#{"}msg.${entityName?uncap_first}${column.@name?cap_first}${r"}"}:" />
        <h:outputText value="${r"#{"}${managedBean}.current.${columnName?uncap_first}.${column.@name?uncap_first}${r"}"}"/>
            	</#if>
        	</#if> 
		</#list>
	</#if>
</#list>
</#macro>

